import baseUrl from './baseUrl'
var fun = function (config) {
  return new Promise((resolve, rejected) => {
    wx.request({
      url: baseUrl + config.url,
      data: config.data,
      timeout: 5000,
      method: config.method,
      success(res) {
        resolve(res)
      }
    })
  })
}
export default fun